<template>
  <div>

    <el-row>
      <el-col :span="8">这里应该有返回数据</el-col>
      <el-col :span="16">{{checkMenuObject}}</el-col>
    </el-row>
    <el-divider></el-divider>
    <el-row>
      <el-col :span="8">这里应该要报错提示没有API权限</el-col>
      <el-col :span="16">{{checkMenuNoneObject}}</el-col>
    </el-row>
  </div>
</template>

<script>

import {checkMenu,checkMenuNone} from "@/api/test"
export default {
  name: 'dataRange',
  data() {
    return {
      checkMenuObject:{},
      checkMenuNoneObject:{}
    }
  },
  mounted() {
    this.checkMenu()
    this.checkMenuNone()
  },
  methods: {
    checkMenu(){
       checkMenu().then(res =>{
         console.log("res",res)
         this.checkMenuObject = res.data
       })
    },
    checkMenuNone(){
      checkMenuNone().catch(err =>{
        console.log("err",err)
        this.checkMenuNoneObject = err.message
      })
    }
  }
}
</script>

<style scoped lang="scss">

</style>
